package com.practice.controller.user;

import com.practice.entity.UserEntity;
import com.practice.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

/**
 * @ClassName UserController
 * @Description TODO
 * @Author KunxianLi
 * Date 2020/7/18 14:57
 * Version 1.0
 **/
@Controller
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("/user/list")
    public String userList(Model model){

        List<UserEntity> userList = userService.getUserList();

        model.addAttribute("uses",userList);

        return "user/member-list";
    }

    @GetMapping("user/person/{userId}")
    public String getUserInfo(Long userId,Model model){

        return "";
    }

}
